package com.cman777.springc.ratelimiter.alg.storage;

import java.util.concurrent.TimeUnit;

/**
 * @author chenzhicong
 * @time 2020/9/17 17:14
 */
public interface RedisStorage {
    Long incrementAndGet(String key);
    boolean setIfAbsent(String key, Long value, Long time, TimeUnit timeUnit);

    boolean expire(String key, long unit, TimeUnit timeUnit);
}
